GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

getRowBoundingRect.js ➔ ???   B
last analyzed

Complexity

Conditions 6
Paths 10

Size

Total Lines 30

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 6
nc 10
dl 0
loc 30
rs 8.439
c 0
b 0
f 0
nop 2
1
export const getRowBoundingRect = (row, container = null) => {
2
3
    if (!container) {
4
        container = row && row.offsetParent
5
            ? row.offsetParent.offsetParent
6
            : null;
7
    }
8
9
    if (!container) {
10
        return {};
11
    }
12
13
    const rowBCR = row.getBoundingClientRect();
14
    const containerBCR = container.getBoundingClientRect();
15
16
    const spaceBottom = containerBCR.bottom - rowBCR.bottom;
17
    const spaceTop = rowBCR.top - containerBCR.top;
18
19
    const maxHeight = Math.max(spaceBottom, spaceTop);
20
    const position = spaceTop > spaceBottom
21
        ? 'top'
22
        : 'bottom';
23
24
    return {
25
        maxHeight,
26
        position,
27
        spaceTop,
28
        spaceBottom
29
    };
30
};
31